const common = require('./webpack.common.js')
const { merge } = require('webpack-merge')
const webpack = require('webpack')

module.exports = merge(common, {
  mode: 'development',
  devServer: {
    contentBase: './public',
    hot: true
  },
  output: {
    filename: `[name].bundle.js`, // https://stackoverflow.com/questions/50217480/cannot-use-chunkhash-or-contenthash-for-chunk-in-name-chunkhash-js-us
  },
  plugins: [
    new webpack.HotModuleReplacementPlugin()
  ]
})
